﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="../css/index.css" rel="stylesheet" />
</head>
<body>
    <div class="maindiv">
        <div id="login">
            <div id="login3">
                <div class="userqX">
                <div class="divspan"><span>用户名：</span></div>
                <div class="divinput"><input type="text" class="input" id="txtName" name="username" placeholder="用户名" autofocus required />
                    </div>
                </div>
                <div class="userqX">
                    <div class="divspan"><span>密   码：</span></div>
                    <div class="divinput"><input type="password" class="input" id="txtPwd" name="password" placeholder="密码" required /></div>
                </div>
                <div class="userqX">
                    <div class="divspan"><span>权  限：</span></div>
                    <div class="divinput"><select class="select" id="selectUserQX"><option value="SCGS">商储公司</option><option value="TGQY">托管企业</option><option value="CBK">储备库</option><option value="SCQY">生产企业</option></select></div>
                </div>
                <div class="btnlogin"><input type="button" id="btnLogin" value="登录" /></div>
                <div style="margin-top:10px;"><label id="_lable" style="font-size: 14px;color: #ff0000;font-weight: bold;"></label></div>
                <input type="hidden" id="getValue" />
            </div>
        </div>
    </div>
</body>
</html>
<script src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
    $("#btnLogin").bind('click', function (){
        var username =$("#txtName").val().trim();
        var pwd = $("#txtPwd").val().trim();
        if (username == "")
        {
            getTimeout();
            $("#_lable").text("用户名不能为空！");
            $("#txtName").val("");
            $("#txtName").focus();
            return;
        }
        else if (pwd == "") {
            $("#_lable").text("密码不能为空！");
            getTimeout();
            $("#txtPwd").val("");
            $("#txtPwd").focus();
            return;
        }
        var companyName =$("#selectUserQX").find('option:selected').text().trim();
        window.location = "complex1.html?company=" + companyName + "";

    });
    function getTimeout()
    {
        setTimeout(function () {
            $("#_lable").text("");
        }, 3000);
    }
</script>
